/*

Replication Do File for Appendix:

Edgell, Amanda B., Valeriya Mechkova, David Altman, Michael Bernhard, and 
	Staffan Lindberg (2017) "When and where do elections matter? A global test 
	of the democratization by elections hypothesis, 1900-2010" 
	DOI:

Data generated using Stata 14
Varieties of Democracy Dataset, Version 6.2 


*/


use "Edgelletal2017_Replication", clear


********************************************************************************
* 		Table A1: Summary statistics and correlations.						   *
********************************************************************************

*Summary Statistics
sum v2x_liberal v2xdl_delib v2x_egal e_rol_free 

*Calculate the between-country correlations
corr v2x_liberal v2xdl_delib v2x_egal e_rol_free

*Calculate the within-country correlations
sort country_id year
egen corr1 = corr(v2x_liberal v2xdl_delib), by(country_id)
egen corr2 = corr(v2x_liberal v2x_egal), by(country_id)
egen corr3 = corr(v2x_liberal e_rol_free), by(country_id)
egen corr4 = corr(v2xdl_delib v2x_egal), by(country_id)
egen corr5 = corr(v2xdl_delib e_rol_free), by(country_id)
egen corr6 = corr(v2x_egal e_rol_free), by(country_id)


sum corr1-corr6
drop corr1-corr6

********************************************************************************
*					Table A2: Linear Estimates								   *
********************************************************************************
eststo clear

*Linear estimates with and without long-standing democracies

*Table A2a.  Linear estimates with long-standing democracies.
eststo, title ("A2.1 Liberal"): qui xtreg 	v2x_liberal elec ///
	lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period, robust
eststo, title ("A2.2 Deliberative"): qui xtreg 	v2xdl_delib elec ///
	lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period, robust
eststo, title ("A2.3 Egalitarian"): qui xtreg 	v2x_egal elec ///
	lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period, robust
eststo, title ("A2.4 Liberal"): qui xtreg v2x_liberal ///
	elec lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ae_dacgdp ///
	ae_fdigdp if year>=1974, fe robust
eststo, title ("A2.5 Deliberative"): qui xtreg v2xdl_delib ///
	elec lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ae_dacgdp ///
	ae_fdigdp if year>=1974, fe robus
eststo, title ("A2.6 Egalitarian"): qui xtreg v2x_egal ///
	elec lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ae_dacgdp ///
	ae_fdigdp if year>=1974, fe robust
	
estout _all, replace ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label ///
	legend varlab(_cons "Constant") mgroup("Full sample (1900-2010)" ///
	"Third wave (1974-2010)", pattern(1 0 0 1 0 0) span) ///
	order(elec lmadgdpt lmadgdpgr wimross_loilpc ///
	fe_etfra ethnic_fr ae_dacgdp ae_fdigdp) ///
	title("Table A2a. Linear estimates with long-standing democracies") ///
	nobaselevel
	
	

	
*Table A2b. Linear estimates, long-standing democracies omitted.

eststo clear

eststo, title ("A2.7 Liberal"): qui xtreg v2x_liberal elec ///
	lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	dem_drop!=1, robust
eststo, title ("A2.8 Deliberative"): qui xtreg v2xdl_delib elec ///
	lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	dem_drop!=1, robust
eststo, title ("A2.9 Egalitarian"): qui xtreg v2x_egal elec ///
	lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	dem_drop!=1, robust
eststo, title ("A2.10 Liberal"): qui xtreg v2x_liberal ///
	elec lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ae_dacgdp ///
	ae_fdigdp if year>=1974 & dem_drop!=1, fe robust
eststo, title ("A2.11 Deliberative"): qui xtreg v2xdl_delib ///
	elec lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ae_dacgdp ///
	ae_fdigdp if year>=1974 & dem_drop!=1, fe robust
eststo, title ("A2.12 Egalitarian"): qui xtreg v2x_egal ///
	elec lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ae_dacgdp ///
	ae_fdigdp if year>=1974 & dem_drop!=1, fe robust

estout _all, replace ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label ///
	legend varlab(_cons "Constant") mgroup("Full sample (1900-2010)" ///
	"Third wave (1974-2010)", pattern(1 0 0 1 0 0) span) ///
	order(elec lmadgdpt lmadgdpgr wimross_loilpc ///
	fe_etfra ethnic_fr ae_dacgdp ae_fdigdp) ///
	title("Table A2b. Linear estimates, long-standing democracies omitted") ///
	nobaselevel 

********************************************************************************
*								Table A3									   *
********************************************************************************
	
**no code here***
	
********************************************************************************
*	Table A4: AIC and BIC statistics for liner-log and linear estimates.	   *
********************************************************************************

eststo clear


*Full Sample (1900-2010)
eststo, title ("Liberal"): qui xtreg v2x_liberal elec ///
	lmadgdpt lmadgdpgr wimross_loilpc  i.hist_period, fe robust
eststo, title ("Liberal"): qui xtreg v2x_liberal lelec_zorn zerod ///
	lmadgdpt lmadgdpgr wimross_loilpc i.hist_period, fe robust

eststo, title ("Deliberative"): qui xtreg v2xdl_delib elec ///
	lmadgdpt lmadgdpgr wimross_loilpc  i.hist_period, fe robust
eststo, title ("Deliberative"): qui xtreg v2xdl_delib lelec_zorn zerod ///
	lmadgdpt lmadgdpgr wimross_loilpc i.hist_period, fe robust

eststo, title ("Egalitarian"): qui xtreg v2x_egal elec ///
	lmadgdpt lmadgdpgr wimross_loilpc  i.hist_period, fe robust
eststo, title ("Egalitarian"): qui xtreg v2x_egal lelec_zorn zerod ///
	lmadgdpt lmadgdpgr wimross_loilpc i.hist_period, fe robust
		
*Third wave (1974-2010)
eststo, title ("Liberal"): qui xtreg v2x_liberal ///
	elec lmadgdpt lmadgdpgr wimross_loilpc ae_dacgdp ///
	ae_fdigdp if year>=1974, fe robust
eststo, title ("Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ae_dacgdp ///
	ae_fdigdp if year>=1974, fe robust

eststo, title ("Deliberative"): qui xtreg v2xdl_delib ///
	elec lmadgdpt lmadgdpgr wimross_loilpc ae_dacgdp ///
	ae_fdigdp if year>=1974, fe robust
eststo, title ("Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ae_dacgdp ///
	ae_fdigdp if year>=1974, fe robust	

eststo, title ("Egalitarian"): qui xtreg v2x_egal ///
	elec lmadgdpt lmadgdpgr wimross_loilpc ae_dacgdp ///
	ae_fdigdp if year>=1974, fe robust
eststo, title ("Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ae_dacgdp ///
	ae_fdigdp if year>=1974, fe robust

est stats _all

********************************************************************************
*				Table A5: Regional Tests									   *
********************************************************************************

eststo clear

*Table A5a: sub-Saharan Africa
eststo clear

eststo, title("A5.1 1910-2010"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	region==1,   robust
eststo, title("A5.2 1974-2010"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp if region==1 & year>=1974, fe  robust
eststo, title ("A5.3 1910-2010"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	region==1,   robust
eststo, title ("A5.4 1974-2010"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if region==1 & year>=1974,  fe robust
eststo, title ("A5.5 1910-2010"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if  ///
	region==1,   robust
eststo, title ("A5.6 1974-2010"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if  region==1 & year>=1974, fe  robust
	
estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	mgroup("Liberal component index" "Deliberative component index" ///
	"Egalitarian component index", pattern(1 0  1 0 1 0) span) ///
	nobaselevel order(lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ///
	fe_etfra ethnic_fr ae_dacgdp ae_fdigdp) varlabel(_cons "Constant") ///
	title("Table A5a. Regional tests: sub-Saharan Africa") 
	
*Table A5b: Middle East and North Africa
eststo clear

eststo, title("A5.7 1925-2010"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	region==2,   robust
eststo, title("A5.8 1974-2010"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp if region==2 & year>=1974, fe  robust
eststo, title ("A5.9 1925-2010"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	region==2,   robust
eststo, title ("A5.10 1974-2010"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if region==2 & year>=1974,  fe robust
eststo, title ("A5.11 1925-2010"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if  ///
	region==2,   robust
eststo, title ("A5.12 1974-2010"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if region==2 & year>=1974, fe  robust

estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	mgroup("Liberal component index" "Deliberative component index" ///
	"Egalitarian component index", pattern(1 0  1 0 1 0) span) ///
	nobaselevel order(lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ///
	fe_etfra ethnic_fr ae_dacgdp ae_fdigdp) varlabel(_cons "Constant") ///
	title("Table A5b. Regional tests: Middle East and North Africa") 
	
	
*Table A5c: Latin America and the Caribbean
eststo clear

eststo, title("A5.13 1900-2010"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	region==3,   robust
eststo, title("A5.14 1974-2010"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp if region==3 & year>=1974, fe  robust
eststo, title ("A5.15 1900-2010"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	region==3,   robust
eststo, title ("A5.16 1974-2010"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if region==3 & year>=1974,  fe robust
eststo, title ("A5.17 1900-2010"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if  ///
	region==3,   robust
eststo, title ("A5.18 1974-2010"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if  region==3 & year>=1974, fe  robust
	
	
estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	mgroup("Liberal component index" "Deliberative component index" ///
	"Egalitarian component index", pattern(1 0  1 0 1 0) span) ///
	nobaselevel order(lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ///
	fe_etfra ethnic_fr ae_dacgdp ae_fdigdp) varlabel(_cons "Constant") ///
	title("Table A5c. Regional tests: Latin America and the Caribbean")
	
	
*Table A5d: Asia
eststo clear


eststo, title("A5.19 1900-2010"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	region==4,   robust
eststo, title("A5.20 1974-2010"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp if region==4 & year>=1974, fe  robust
eststo, title ("A5.21 1900-2010"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	region==4,   robust
eststo, title ("A5.22 1974-2010"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if region==4 & year>=1974,  fe robust
eststo, title ("A5.23 1900-2010"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if  ///
	region==4,   robust
eststo, title ("A5.24 1974-2010"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if  region==4 & year>=1974, fe  robust

estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	mgroup("Liberal component index" "Deliberative component index" ///
	"Egalitarian component index", pattern(1 0  1 0 1 0) span) ///
	nobaselevel order(lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ///
	fe_etfra ethnic_fr ae_dacgdp ae_fdigdp) varlabel(_cons "Constant") ///
	title("Table A5d. Regional tests: Asia") 
	
	
*Table A5e: Post-communist Eurasia
eststo clear

eststo, title("A5.25 1901-2010"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	region==5,   robust
eststo, title("A5.26 1974-2010"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp if region==5 & year>=1974, fe  robust
eststo, title ("A5.27 1901-2010"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	region==5,   robust
eststo, title ("A5.28 1974-2010"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if region==5 & year>=1974,  fe robust
eststo, title ("A5.29 1901-2010"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if  ///
	region==5,   robust
eststo, title ("A5.30 1974-2010"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if  region==5 & year>=1974, fe  robust
	
estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	mgroup("Liberal component index" "Deliberative component index" ///
	"Egalitarian component index", pattern(1 0  1 0 1 0) span) ///
	nobaselevel order(lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ///
	fe_etfra ethnic_fr ae_dacgdp ae_fdigdp) varlabel(_cons "Constant") ///
	title("Table A5e. Regional tests: Post-communist Eurasia") 


********************************************************************************
*			Table A6: Global sample, post-Cold War (1989-2010).				   *
********************************************************************************

**Post-Cold War Sample
eststo clear

eststo, title ("A6.1 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr ae_dacgdp ///
	ae_fdigdp if  year>=1989, fe robust
eststo, title ("A6.2 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr ae_dacgdp ///
	ae_fdigdp if  year>=1989, fe robust
eststo, title ("A6.3 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr ae_dacgdp ///
	ae_fdigdp if  year>=1989, fe robust

estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	varlabel(_cons "Constant") ///
	title("Table A6. Global sample, post-Cold War (1989-2010)")


********************************************************************************
*				Table A7: Regional samples, post-Cold War (1989-2010).	  	   *
********************************************************************************

eststo clear

eststo, title("A7.1 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp if region==1 & year>=1989, fe  robust
eststo, title ("A7.2 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if region==1 & year>=1989,  fe robust
eststo, title ("A7.3 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if region==1 & year>=1989, fe  robust
	
eststo, title("A7.4 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp if region==2 & year>=1989, fe  robust
eststo, title ("A7.5 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if region==2 & year>=1989,  fe robust
eststo, title ("A7.6 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if region==2 & year>=1989, fe  robust
	
eststo, title("A7.7 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp if region==3 & year>=1989, fe  robust
eststo, title ("A7.8 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if region==3 & year>=1989,  fe robust
eststo, title ("A7.9 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if region==3 & year>=1989, fe  robust
	
estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	mgroup("sub-Saharan Africa" "Middle East and North Africa" ///
	"Latin America and the Caribbean", pattern(1 0 0 1 0 0 1 0 0) span) ///
	 varlabel(_cons "Constant") ///
	title("Table A7a. Regional samples, post-Cold War (1989-2010)")
	
eststo clear

eststo, title("A7.10 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp if region==4 & year>=1989, fe  robust
eststo, title ("A7.11 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if region==4 & year>=1989,  fe robust
eststo, title ("A7.12 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if  region==4 & year>=1989, fe  robust
	
	
eststo, title("A7.13 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp if region==5 & year>=1989, fe  robust
eststo, title ("A7.14 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if region==5 & year>=1989,  fe robust
eststo, title ("A7.15 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp  if region==5 & year>=1989, fe  robust
	
estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	mgroup("Asia" "Post-communist Eurasia", pattern(1 0 0 1 0 0 1 0 0) span) ///
	 varlabel(_cons "Constant")  ///
	title("Table A7b. Regional samples, post-Cold War (1989-2010)") 

********************************************************************************
*	Table A8: Global sample, outcome as rule of law and civil liberties index. *
********************************************************************************
**Results using thicker ROL/CL measure
eststo clear

eststo, title ("8.1 Full sample"): qui xtreg e_rol_free lelec_zorn zerod ///
	lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period, robust
eststo, title ("8.2 Early 20th century"): qui xtreg e_rol_free ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	if hist_period==1,  robust
eststo, title ("8.3 Cold War"): qui xtreg e_rol_free ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	if (hist_period==2 | hist_period==3), fe robust
eststo, title ("8.4 Third wave"): qui xtreg e_rol_free ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ae_dacgdp ///
	ae_fdigdp if year>=1974, fe robust
eststo, title ("8.5 Post-Cold War"): qui xtreg e_rol_free ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr ae_dacgdp ///
	ae_fdigdp if year>=1989, fe robust

	
estout _all, replace ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) nobaselevel label ///
	order(lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ///
	fe_etfra ethnic_fr ae_dacgdp ae_fdigdp) varlabel(_cons "Constant") ///
	title("Table A8. Global sample, outcome as rule of law and civil liberties index") 

********************************************************************************
* Table A9: Regional samples, outcome as rule of law and civil liberties index *
********************************************************************************


*Table A9a. 
eststo clear

*sub-Saharan Africa
eststo, title("A9.1 1910-2010"): qui xtreg e_rol_free ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	region==1,   robust
eststo, title("A9.2 1974-2010"): qui xtreg e_rol_free ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp if region==1 & year>=1974, fe  robust

	
*Middle East and North Africa
eststo, title("A9.3 1925-2010"): qui xtreg e_rol_free ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	region==2,   robust
eststo, title("A9.4 1974-2010"): qui xtreg e_rol_free ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp if region==2 & year>=1974, fe  robust

	
*Latin America and the Caribbean
eststo, title("A9.5 1900-2010"): qui xtreg e_rol_free ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	region==3,   robust
eststo, title("A9.6 1974-2010"): qui xtreg e_rol_free ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp if region==3 & year>=1974, fe  robust
	
estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	mgroup("sub-Saharan Africa" "Middle East and North Africa" ///
	"Latin America and the Caribbean", pattern(1 0 1 0 1 0) span) ///
	 varlabel(_cons "Constant") ///
	title("Table A9a. Regional samples, outcome as rule of law and civil liberties index")

	
*Table A9b. (continued)
eststo clear

*Asia
eststo, title("A9.7 1900-2010"): qui xtreg e_rol_free ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	region==4,   robust
eststo, title("A9.8 1974-2010"): qui xtreg e_rol_free ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp if region==4 & year>=1974, fe  robust


*Post-communist Eurasia
eststo, title("A9.9 1901-2010"): qui xtreg e_rol_free ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ///
	region==5,   robust
eststo, title("A9.10 1974-2010"): qui xtreg e_rol_free ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	ae_dacgdp ae_fdigdp if region==5 & year>=1974, fe  robust

estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	mgroup("Asia" "Post-communist Eurasia", pattern(1 0 1 0 1 0) span) ///
	 varlabel(_cons "Constant") ///
	title("Table A9b. Regional samples, outcome as rule of law and civil liberties index")
	
********************************************************************************
*	Table A10: Variables used for e_rol_free								   *
********************************************************************************
	
**No code***

********************************************************************************
*		Table A11:	Historical period samples, country random-effects.		   *
********************************************************************************
eststo clear

*Cold War (1946-1988)
eststo, title ("A11.1 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	if  (hist_period==2 | hist_period==3),  robust
eststo, title ("A11.2 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	if  (hist_period==2 | hist_period==3),  robust
eststo, title ("A11.3 Egalitaria"): qui xtreg v2x_egal ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	if  (hist_period==2 | hist_period==3),  robust
	
*Third wave (1974-2010)
eststo, title ("A11.4 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ae_dacgdp ///
	ae_fdigdp if  year>=1974, robust
eststo, title ("A11.5 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ae_dacgdp ///
	ae_fdigdp if  year>=1974, robust
eststo, title ("A11.6 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ae_dacgdp ///
	ae_fdigdp if  year>=1974, robust
	
*Post-Cold War (1989-2010)
eststo, title ("A11.7 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ae_dacgdp ///
	ae_fdigdp if  year>=1989, robust
eststo, title ("A11.8 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ae_dacgdp ///
	ae_fdigdp if  year>=1989, robust
eststo, title ("A11.9 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ae_dacgdp ///
	ae_fdigdp if  year>=1989, robust
	


estout _all, replace ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label ///
	legend varlab(_cons "Constant") mgroup("Cold War (1946-1988)" ///
	"Third wave (1974-2010)" "Post-Cold War (1989-2010)", ///
	pattern(1 0 0 1 0 0 1 0 0) span) ///
	order(lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ///
	fe_etfra ethnic_fr ae_dacgdp ae_fdigdp) ///
	title("Table A11. Historical period samples, country random-effects") ///
	nobaselevel 
	
********************************************************************************
*	Table A12: Regional samples in the third wave (1974-2010), random effects. *
********************************************************************************
eststo clear

*Table A12a.

* sub-Saharan Africa
eststo, title ("A12.1 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	ae_dacgdp ae_fdigdp if  region==1 & year>=1974,  robust
eststo, title ("A12.2 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra ///
	ae_dacgdp ae_fdigdp if  region==1 & year>=1974,  robust
eststo, title ("A12.3 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	ae_dacgdp ae_fdigdp if region==1 & year>=1974,  robust

* MENA
eststo, title ("A12.4 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	ae_dacgdp ae_fdigdp if  region==2 & year>=1974,  robust
eststo, title ("A12.5 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra ///
	ae_dacgdp ae_fdigdp if  region==2 & year>=1974,  robust
eststo, title ("A12.6 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	ae_dacgdp ae_fdigdp if  region==2 & year>=1974,  robust
	
* Latin America and the Caribbean
eststo, title ("A12.7 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	ae_dacgdp ae_fdigdp if region==3 & year>=1974,  robust
eststo, title ("A12.8 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra ///
	ae_dacgdp ae_fdigdp if  region==3 & year>=1974,  robust
eststo, title ("A12.9 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	ae_dacgdp ae_fdigdp if  region==3 & year>=1974,  robust
	
estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	mgroup("sub-Saharan Africa" "Middle East and North Africa" ///
	"Latin America and the Caribbean", pattern(1 0 1 0 1 0) span) ///
	 varlabel(_cons "Constant") ///
	title("Table A12a. Regional samples in the third wave,  random effects")

*Table 12b (continued)
eststo clear

* Asia
eststo, title ("A12.10 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	ae_dacgdp ae_fdigdp if  region==4 & year>=1974,  robust
eststo, title ("A12.11 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra ///
	ae_dacgdp ae_fdigdp if  region==4 & year>=1974,  robust
eststo, title ("A12.13 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	ae_dacgdp ae_fdigdp if  region==4 & year>=1974,  robust
	
* Post-communist Eurasia
eststo, title ("A12.14 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	ae_dacgdp ae_fdigdp if  region==5 & year>=1974,  robust
eststo, title ("A12.15 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra ///
	ae_dacgdp ae_fdigdp if  region==5 & year>=1974,  robust
eststo, title ("A12.16 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	ae_dacgdp ae_fdigdp if  region==5 & year>=1974,  robust
	
estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	mgroup("Asia" "Post-communist Eurasia", pattern(1 0 1 0 1 0) span) ///
	 varlabel(_cons "Constant") ///
	title("Table A12b. Regional samples in the third wave,  random effects")
	
********************************************************************************
*		Table A13: Freedom House Civil Liberties Score					       *
********************************************************************************
eststo clear


eststo, title ("A13.1 Full sample"): qui xtreg fhclresc ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr ae_dacgdp ///
	ae_fdigdp if year>=1974, fe robust
eststo, title ("A13.2 sub-Saharan Africa"): qui xtreg fhclresc ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr ae_dacgdp ///
	ae_fdigdp if year>=1974 & region==1, fe robust	
eststo, title ("A13.3 Middle East and North Africa"): qui xtreg fhclresc ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr ae_dacgdp ///
	ae_fdigdp if year>=1974 & region==2, fe robust	
eststo, title ("A13.4 Latin America and the Caribbean"): qui xtreg fhclresc ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr ae_dacgdp ///
	ae_fdigdp if year>=1974 & region==3, fe robust	
eststo, title ("A13.5 Asia"): qui xtreg fhclresc ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr ae_dacgdp ///
	ae_fdigdp if year>=1974 & region==4, fe robust	
eststo, title ("A13.6 Post-communist Eurasia"): qui xtreg fhclresc ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr ae_dacgdp ///
	ae_fdigdp if year>=1974 & region==5, fe robust	

estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	varlabel(_cons "Constant") ///
	title("Table A13. Global and regional samples, Freedom House Civil Liberties")


********************************************************************************
*	Table A14: Global sample (1900-2010), controlling for civil society		   *
********************************************************************************
eststo clear


eststo, title ("14.1 Liberal"): qui xtreg v2x_liberal lelec_zorn zerod ///
	lmadgdpt lmadgdpgr wimross_loilpc fe_etfra cpart_constant i.hist_period, robust
eststo, title ("14.2 Deliberative"): qui xtreg v2xdl_delib lelec_zorn zerod ///
	lmadgdpt lmadgdpgr wimross_loilpc fe_etfra cpart_constant i.hist_period, robust
eststo, title ("14.3 Egalitarian"): qui xtreg v2x_egal lelec_zorn zerod ///
	lmadgdpt lmadgdpgr wimross_loilpc fe_etfra cpart_constant i.hist_period, robust

estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	varlabel(_cons "Constant") ///
	title("Table A14. Global sample, controlling for civil society")
	
********************************************************************************
*	Table A15: Historical period samples, controlling for civil society		   *
********************************************************************************
eststo clear

*Early 20th century (1900-1945)
eststo, title ("Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn lmadgdpt lmadgdpgr wimross_loilpc fe_etfra cpart_constant ///
	if hist_period==1,  robust
eststo, title ("Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn lmadgdpt lmadgdpgr wimross_loilpc fe_etfra cpart_constant ///
	if hist_period==1,  robust
eststo, title ("Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn lmadgdpt lmadgdpgr wimross_loilpc fe_etfra cpart_constant  ///
	if hist_period==1,  robust

*Cold War (1946-1988)
eststo, title ("Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn lmadgdpt lmadgdpgr wimross_loilpc fe_etfra cpart_constant  ///
	if (hist_period==2 | hist_period==3),  robust
eststo, title ("Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn lmadgdpt lmadgdpgr wimross_loilpc fe_etfra cpart_constant  ///
	if (hist_period==2 | hist_period==3), robust
eststo, title ("Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn lmadgdpt lmadgdpgr wimross_loilpc fe_etfra cpart_constant  ///
	if (hist_period==2 | hist_period==3), robust

*Third wave (1974-2010)
eststo, title ("Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn lmadgdpt lmadgdpgr wimross_loilpc fe_etfra cpart_constant ae_dacgdp ///
	ae_fdigdp if year>=1974, robust
eststo, title ("Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn lmadgdpt lmadgdpgr wimross_loilpc fe_etfra cpart_constant  ae_dacgdp ///
	ae_fdigdp if  year>=1974, robust
eststo, title ("Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn lmadgdpt lmadgdpgr wimross_loilpc fe_etfra cpart_constant  ae_dacgdp ///
	ae_fdigdp if year>=1974, robust

estout _all, replace ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label ///
	legend varlab(_cons "Constant") mgroup("Early 20th century (1900-1945)" ///
	"Cold War (1946-1988)" "Third wave (1974-2010)", ///
	pattern(1 0 0 1 0 0 1 0 0) span) ///
	order(lelec_zorn lmadgdpt lmadgdpgr wimross_loilpc ///
	fe_etfra cpart_constant ae_dacgdp ae_fdigdp) ///
	title("Table A15. Historical period samples, controlling for civil society") ///
	nobaselevel 

********************************************************************************
*	Table A16: Regional Samples, controlling for civil society				   *
********************************************************************************
eststo clear

*Table A16a.

* sub-Saharan Africa
eststo, title ("A16.1 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	cpart_constant ae_dacgdp ae_fdigdp if  region==1 & year>=1974, robust
eststo, title ("A16.2 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra ///
	cpart_constant ae_dacgdp ae_fdigdp if  region==1 & year>=1974, robust
eststo, title ("A16.3 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	cpart_constant ae_dacgdp ae_fdigdp if region==1 & year>=1974, robust

* MENA
eststo, title ("A16.4 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	cpart_constant ae_dacgdp ae_fdigdp if  region==2 & year>=1974, robust
eststo, title ("A16.5 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra ///
	cpart_constant ae_dacgdp ae_fdigdp if  region==2 & year>=1974, robust
eststo, title ("A16.6 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	cpart_constant ae_dacgdp ae_fdigdp if  region==2 & year>=1974, robust
	
* Latin America and the Caribbean
eststo, title ("A16.7 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	cpart_constant ae_dacgdp ae_fdigdp if region==3 & year>=1974, robust
eststo, title ("A16.8 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra ///
	cpart_constant ae_dacgdp ae_fdigdp if  region==3 & year>=1974, robust
eststo, title ("A16.9 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	cpart_constant ae_dacgdp ae_fdigdp if  region==3 & year>=1974, robust
	
estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	mgroup("sub-Saharan Africa" "Middle East and North Africa" ///
	"Latin America and the Caribbean", pattern(1 0 1 0 1 0) span) ///
	 varlabel(_cons "Constant") ///
	title("Table A16a. Regional samples in the third wave, controlling for civil society")

*Table 16b (continued)
eststo clear

* Asia
eststo, title ("A16.10 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	cpart_constant ae_dacgdp ae_fdigdp if  region==4 & year>=1974, robust
eststo, title ("A16.11 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra ///
	cpart_constant ae_dacgdp ae_fdigdp if  region==4 & year>=1974, robust
eststo, title ("A16.13 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	cpart_constant ae_dacgdp ae_fdigdp if  region==4 & year>=1974, robust
	
* Post-communist Eurasia
eststo, title ("A16.14 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	cpart_constant ae_dacgdp ae_fdigdp if  region==5 & year>=1974, robust
eststo, title ("A16.15 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra ///
	cpart_constant ae_dacgdp ae_fdigdp if  region==5 & year>=1974, robust
eststo, title ("A16.16 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod  lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	cpart_constant ae_dacgdp ae_fdigdp if  region==5 & year>=1974, robust
	
estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	mgroup("Asia" "Post-communist Eurasia", pattern(1 0 1 0 1 0) span) ///
	 varlabel(_cons "Constant") ///
	title("Table A16b. Regional samples in the third wave, controlling for civil society")

	
********************************************************************************
*  Table A17: Global sample, election-year unit of analysis					   *
********************************************************************************
eststo clear


eststo, title ("17.1 Liberal"): qui xtreg v2x_liberal lelec_zorn zerod ///
	lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  i.hist_period if ecyc==1, robust
eststo, title ("17.2 Deliberative"): qui xtreg v2xdl_delib lelec_zorn zerod ///
	lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  i.hist_period if ecyc==1, robust
eststo, title ("17.3 Egalitarian"): qui xtreg v2x_egal lelec_zorn zerod ///
	lmadgdpt lmadgdpgr wimross_loilpc fe_etfra i.hist_period if ecyc==1, robust

	
estout _all, ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o  N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label legend ///
	varlabel(_cons "Constant") ///
	title("Table A17. Global sample, election-year unit of analysis")
	
	
********************************************************************************
* Table A18: Historical period samples, election-year as unit of analysis	   *
********************************************************************************
eststo clear

*Early 20th century (1900-1945)
eststo, title ("18.1 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc fe_etfra   ///
	if ecyc==1 & hist_period==1,  robust
eststo, title ("18.2 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc fe_etfra  ///
	if ecyc==1 & hist_period==1,  robust
eststo, title ("18.3 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc fe_etfra   ///
	if ecyc==1 & hist_period==1,  robust
	
*Cold War (1946-1988)
eststo, title ("18.4 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr   ///
	if ecyc==1 & (hist_period==2 | hist_period==3),  fe robust
eststo, title ("18.5 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr  ///
	if ecyc==1 & (hist_period==2 | hist_period==3), fe robust
eststo, title ("18.6 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr   ///
	if ecyc==1 & (hist_period==2 | hist_period==3), fe robust
	
*Third wave (1974-2010)
eststo, title ("18.7 Liberal"): qui xtreg v2x_liberal ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr ae_dacgdp ///
	ae_fdigdp if ecyc==1 & year>=1974, fe robust
eststo, title ("18.8 Deliberative"): qui xtreg v2xdl_delib ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr ae_dacgdp ///
	ae_fdigdp if ecyc==1 & year>=1974, fe robust
eststo, title ("18.9 Egalitarian"): qui xtreg v2x_egal ///
	lelec_zorn zerod lmadgdpt lmadgdpgr wimross_loilpc ethnic_fr ae_dacgdp ///
	ae_fdigdp if ecyc==1 & year>=1974, fe robust

estout _all, replace ///
	cells(b(star fmt(2)) se(par)) ///
	stats(r2_w r2_b r2_o N_clust N, labels(R2-within R2-between R2-overall ///
	Countries Observations)) ///
	starlevels(^ 0.10 * 0.05 ** 0.01 *** 0.001) label ///
	legend varlab(_cons "Constant") mgroup("Early 20th century (1900-1945)" ///
	"Cold War (1946-1988)" "Third wave (1974-2010)", ///
	pattern(1 0 0 1 0 0 1 0 0) span) ///
	order(lelec_zorn lmadgdpt lmadgdpgr wimross_loilpc ///
	fe_etfra cpart_constant ae_dacgdp ae_fdigdp) ///
	title("Table A18. Historical period samples, election-year unit of analysis")


	

	
